package com.zzedu.web.controller;

import com.zzedu.annon.AccessPermission;
import com.zzedu.common.annotation.Log;
import com.zzedu.common.enums.BusinessType;
import com.zzedu.common.enums.OperatorType;
import com.zzedu.common.enums.UserTypeEnumns;
import com.zzedu.manager.IZzFeedBackManager;
import com.zzedu.result.Result;
import com.zzedu.stu.req.SubmitFeedBack;
import com.zzedu.utils.BaseReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * APP反馈
 */
@RestController
@RequestMapping("/feedback")
public class FeedBackController {

    @Autowired
    IZzFeedBackManager zzFeedBackManager;
    /**
     * APP反馈
     *
     * @return
     */
    @PostMapping(value = {"/save"}, produces = {MediaType.APPLICATION_JSON_VALUE}, consumes = {MediaType.APPLICATION_JSON_VALUE})
    @Log(title = "APP反馈-提交意见", businessType = BusinessType.APP_STUDENT, operatorType = OperatorType.MOBILE)
    @Deprecated
    public Result submit(@Validated @RequestBody BaseReq<SubmitFeedBack> baseRequest) {
        return zzFeedBackManager.submit(baseRequest.getData());
    }
}
